= form_for @blog, :html => {:multipart => true} do |f|
  = f.hidden_field :retained_logo
  = f.hidden_field :retained_background
  - if @blog.errors.any?
    #error_explanation
      %h5
        = pluralize(@blog.errors.count, "error")
        prohibited this blog from being saved:
      %ul
        - @blog.errors.full_messages.each do |msg|
          %li= msg
  %h4 Main
  .field
    = f.label :title
    = f.text_field :title
  .field
    = f.label :description
    = f.text_area :description, :placeholder => "What is your blog about? This will go under RSS feed.", :rows => 2
  .field
    = f.label :footer
    = f.text_area :footer, :placeholder => "You can use markdown in this field.", :rows => 2

  %h4 Graphics
  .field
    = f.label :logo
    = f.file_field :logo

  .field
    = f.label :background, "Background Image"
    = f.file_field :background

  .field
    %label
      Background Behavior
    .row-fluid
      .span2
        = label :background_tile, "false", :class => "radio" do
          = f.radio_button :background_tile, false
          Stretch
      .span2
        = label :background_tile, "true", :class => "radio" do
          = f.radio_button :background_tile, true
          Tile
  .field
    %label
      Background Blur
    .row-fluid
      .span2
        = label :background_blur, 0, :class => "radio" do
          = f.radio_button :background_blur, 0
          Off
      .span2
        = label :background_blur, 1, :class => "radio" do
          = f.radio_button :background_blur, 1
          Normal
      .span2
        = label :background_blur, 2, :class => "radio" do
          = f.radio_button :background_blur, 2
          Strong

  %h4 Under the Hood
  .field
    = f.label :twitter, "Your Twitter Handle"
    = f.text_field :twitter, :placeholder => "e.g. vasinov"
  .field
    = f.label :google_analytics, "Google Analytics ID"
    = f.text_field :google_analytics, :placeholder => "e.g. UA-00000000-1"
  .field
    = f.label :disqus_shortname, "Disqus Shortname"
    = f.text_field :disqus_shortname, :placeholder => "e.g. yourblog"

  .actions
    = f.submit :class => "btn btn-primary"